[tempo-distributed] Service labels for distributor and query-frontend #2430
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have a need to add service labels to support some service mesh configuration specifically for the distributor and query-frontend. These are added following the pattern that is already used for other services that have labels for the main services.
For the existing services with user-settable labels, there aren't any that also have paired discovery services, so I wasn't sure what to do here. Looking at related annotations, there is inconsistency in how they are named across the distributor and queryFrontend:
The approach that I took was to add labels for the discovery services following the existing naming pattern followed for queryFrontend annotations. So,
distributor.serviceDiscovery.labels
andqueryFrontend.serviceDiscovery.labels
. I'm happy to rework this if you'd like it done differently (or if you'd like to avoid adding service annotations on the discovery services altogether). Of course, please feel free to edit as needed.For reference, here are the services that previously allowed user-settable labels before this change, the ones that were added with this change, and those that do not have user-settable labels after this change. If you want them added to any other services, please let me know and I'll be happy to add them to this PR.
Previously had user-settable service labels:
Added with this PR:
No user-settable service labels yet:
Lastly, this is my first contribution to this repository, so if I need to change anything, please let me know. Thanks!